<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>
<s:include value="/WEB-INF/content/common/header.jsp" />

<style type="text/css">
.div-table-col {
	width: 100px;
}

.table th,.table td {
	text-align: center;
}

#tableData {
	overflow-y: scroll;
	height: 200px;
}
</style>
<title><s:text name="global.application.title" /> - <s:text name="global.title.selectclient" /></title>
</head>
<body>

	<s:include value="/WEB-INF/content/common/title-head.jsp" />

		<div data-role="content">		
			<div class="ui-bar ui-bar-c rounded" style="margin-top:10px;">
			
				<div class="center">
					<h5><s:text name="SelectClient.UserSelection" /></h5>
				</div>					
							
				<s:form action="searchClient" namespace="/selectClient"	data-ajax="false">
					
					<fieldset class="ui-grid-a">
						<div class="ui-block-a" style="width:20%; margin-top:17px;">	
								<s:text name="SelectClient.Name" />
						</div>
						<div class="ui-block-b" style="width:80%">
							<input name="searchClient.userName"
								placeholder='<s:property value="%{getText('SelectClient.searchall')}"/>' />
						</div>

						<div class="ui-block-a" style="width:20%; margin-top:17px;">
							<s:text name="SelectClient.Address" />
						</div>
						<div class="ui-block-b" style="width:80%">
							<input name="searchClient.residance"
								placeholder='<s:property value="%{getText('SelectClient.searchall')}"/>' />
						</div>
			
						<div class="ui-block-a" style="width:20%; margin-top:17px;">
							<s:text name="SelectClient.HCSID" />
						</div>
						<div class="ui-block-b" style="width:80%">
							<input name="searchClient.hcsID" 
								placeholder='<s:property value="%{getText('SelectClient.searchall')}"/>' />
						</div>
				
						<div class="ui-block-a" style="width:60%"></div>
						<div class="ui-block-b" style="width:40%">
							<button type="submit" data-theme="b" >
								<s:text name="SelectClient.Search" />
							</button>
						</div>
					
					</fieldset>
				</s:form>
			</div>

			<div class="ui-bar ui-bar-c rounded" style="margin-top:10px;">

				<ul data-role="listview" data-inset="true">
<%-- 					<thead>
						<tr>
							<th><s:text name="#" /></th>
							<th class="nowrap"><s:text name="SelectClient.ViewMenu" /></th>
							<th class="nowrap"><s:text name="SelectClient.WeekData" /></th>
							<th class="nowrap"><s:text name="SelectClient.ClientName" /></th>
							<th class="nowrap"><s:text name="SelectClient.Address" /></th>
							<th class="nowrap"><s:text name="SelectClient.ClientID" /></th>
						</tr>
					</thead> --%>

					<s:actionerror cssClass="alert alert-error"/>

						<s:iterator value="selectClientList" status="rowIndex">
						
							<li>
									<a href="#user<s:property value='#rowIndex.index'/>" data-rel="popup" data-position-to="window" data-transition="pop">
									<p><s:property value="uid" /></p>

										<h2><s:property value="userName" /></h2>
											<p><s:property value="residance" /></p>
											<p class="ui-li-aside"><s:property value="hcsID" /></p>
									</a>
								
								<div data-role="popup" id="user<s:property value='#rowIndex.index'/>" data-theme="a" data-overlay-theme="a" class="ui-content" style="max-width:340px; padding-bottom:2em;">
								    <a href="#" id="closeselectdate" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
								    <h3><s:property value="userName" /></h3>
								    <p><s:property value="hcsID" /></p>
								    
								    <fieldset class="ui-grid-a">
								    <div class="ui-block-a">
								    	<div class="ui-bar ui-bar-a center rounded" style="height:90px">
								    	
										    <s:url action="view" namespace="/menuItems"	var="menuUrl">
												<s:param name="patientClientUID" value="clientID"/>
											</s:url>
											
											<s:a href="%{#menuUrl}" data-ajax="false">											
												<img src="../theme/img/menu.png">												
											</s:a>
											<s:text name="SelectClient.ViewMenu"/>
										</div>
										
									</div>
									
									<div class="ui-block-b ">
										<div class="ui-bar ui-bar-a center rounded" style="height:90px">
											<s:url action="view" namespace="/weekData"	var="weekUrl">
												<s:param name="patientClientUID" value="clientID"/>
											</s:url>
											
											<s:a href="%{#weekUrl}" data-ajax="false">
												<img src="../theme/img/weekdata.png">
											</s:a>
											<s:text name="SelectClient.WeekData" />
										</div>
									</div>
									
									</fieldset>
									
								</div>

							</li>
						</s:iterator>
				</ul>
			</div>
		</div>
		<s:include value="/WEB-INF/content/common/footer.jsp" />
	